import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home.component';

import { AuthService } from '../../../@core/auth/auth.service';

let rule = [];

const routes: Routes = [
  {
    path:'',
    component:HomeComponent,
    children:[
      {
        path: '',
        redirectTo: 'clue',
        pathMatch: 'full',
      },
      {    
        path:'clue', 
        loadChildren:'./clue/clue.module#ClueModule',
        data:{title:'线索管理',breadcrumb:'clue'}
      },
      { 
        path:'handle',
        loadChildren:'./handle/handle.module#HandleModule',
        data: {type: 'handle', 'addPermissions': true,title:'案件办理',breadcrumb:"approvalhandle"}
      },
      { 
        path:'approval',
        loadChildren:'./handle/handle.module#HandleModule',
        data: {type: 'approval', 'addPermissions': false,title:'案件审批',breadcrumb:"approval"}
      },
      { 
        path:'settings',
        loadChildren:'./settings/settings.module#SettingsModule',
        data:{title:'系统设置',breadcrumb:'settings'}
      },
      {
        path:'charts',
        loadChildren:'./charts/charts.module#ChartsModule',
        data:{title:'统计图表',breadcrumb:'charts'}
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class HomeRoutingModule {

  constructor(private authService: AuthService ) {

  }

}
